home *** CD-ROM | disk | FTP | other *** search
-
- SHMEM_WAIT(3) SHMEM_WAIT(3)
-
-
- NNNNAAAAMMMMEEEE
- sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt,
- sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll,
- sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt,
- sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll, sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll,
- sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll - Waits for a variable on the local
- processing element (PE) to change
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- C or C++:
-
- ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt((((iiiinnnntttt ****_v_a_r,,,, iiiinnnntttt _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll((((iiiinnnntttt ****_v_a_r,,,, iiiinnnntttt _c_o_n_d,,,, iiiinnnntttt _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt((((lllloooonnnngggg ****_v_a_r,,,, lllloooonnnngggg _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll((((lllloooonnnngggg ****_v_a_r,,,, iiiinnnntttt _c_o_n_d,,,, lllloooonnnngggg _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt((((lllloooonnnngggg lllloooonnnngggg ****_v_a_r,,,, lllloooonnnngggg lllloooonnnngggg _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll((((lllloooonnnngggg lllloooonnnngggg ****_v_a_r,,,, iiiinnnntttt _c_o_n_d,,,, lllloooonnnngggg lllloooonnnngggg
- _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt((((sssshhhhoooorrrrtttt ****_v_a_r,,,, sssshhhhoooorrrrtttt _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll((((sssshhhhoooorrrrtttt ****_v_a_r,,,, iiiinnnntttt _c_o_n_d,,,, sssshhhhoooorrrrtttt _v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt((((lllloooonnnngggg ****_i_v_a_r,,,, lllloooonnnngggg _c_m_p__v_a_l_u_e))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll((((lllloooonnnngggg ****_i_v_a_r,,,, iiiinnnntttt _c_m_p,,,, lllloooonnnngggg _v_a_l_u_e))));;;;
-
- Fortran:
-
- IIIINNNNCCCCLLLLUUUUDDDDEEEE """"mmmmpppppppp////sssshhhhmmmmeeeemmmm....ffffhhhh""""
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____WWWWAAAAIIIITTTT((((_i_v_a_r,,,, _c_m_p__v_a_l_u_e))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT4444____WWWWAAAAIIIITTTT____UUUUNNNNTTTTIIIILLLL((((_i_v_a_r,,,, _c_m_p,,,, _c_m_p__v_a_l_u_e))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____WWWWAAAAIIIITTTT((((_i_v_a_r,,,, _c_m_p__v_a_l_u_e))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____WWWWAAAAIIIITTTT____UUUUNNNNTTTTIIIILLLL((((_i_v_a_r,,,, _c_m_p,,,, _c_m_p__v_a_l_u_e))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____WWWWAAAAIIIITTTT((((_i_v_a_r,,,, _c_m_p__v_a_l_u_e))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____WWWWAAAAIIIITTTT____UUUUNNNNTTTTIIIILLLL((((_i_v_a_r,,,, _c_m_p,,,, _c_m_p__v_a_l_u_e))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt and sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll wait for _i_v_a_r to be changed by a
- remote write or atomic swap issued by a different processor. These
- routines can be used for point-to-point directed synchronization. A
- call to sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt does not return until some other processor writes a
- value, not equal to _c_m_p__v_a_l_u_e, into _i_v_a_r on the waiting processor. A
- call to sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll does not return until some other processor
- changes _i_v_a_r to satisfy the condition implied by _c_m_p and _c_m_p__v_a_l_u_e.
- This mechanism is useful when a processor needs to tell another
- processor that it has completed some action.
-
- The arguments are as follows:
-
- _i_v_a_r A remotely accessible integer variable that is being updated
- by another PE. If you are using C/C++, the type of _i_v_a_r
- should match that implied in the SYNOPSIS section. If you are
- using Fortran, _i_v_a_r must be a specific sized integer type
- according to the function being called, as follows:
-
- FFFFuuuunnnnccccttttiiiioooonnnn TTTTyyyyppppeeee ooooffff _i_v_a_r
-
- sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt
- sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll default IIIINNNNTTTTEEEEGGGGEEEERRRR
-
- sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt
- sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll IIIINNNNTTTTEEEEGGGGEEEERRRR****4444
-
- sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt
- sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll IIIINNNNTTTTEEEEGGGGEEEERRRR****8888
-
- _c_m_p The compare operator that compares _i_v_a_r with _c_m_p__v_a_l_u_e. _c_m_p
- must be of type integer. If you are using Fortran, it must be
- of default kind. If you are using C/C++, the type of _c_m_p
- should match that implied in the SYNOPSIS section.
-
- The following _c_m_p values are supported:
-
- _c_m_p VVVVaaaalllluuuueeee CCCCoooommmmppppaaaarrrriiiissssoooonnnn
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____EEEEQQQQ Equal
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____NNNNEEEE Not equal
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____GGGGTTTT Greater than
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____LLLLEEEE Less than or equal to
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____LLLLTTTT Less than
-
- SSSSHHHHMMMMEEEEMMMM____CCCCMMMMPPPP____GGGGEEEE Greater than or equal to
-
- _c_m_p__v_a_l_u_e
- _c_m_p__v_a_l_u_e must be of type integer. If you are using C/C++,
- the type of _c_m_p__v_a_l_u_e should match that implied in the
- SYNOPSIS section. If you are using Fortran, _c_m_p__v_a_l_u_e must be
- an integer of the same size and kind as _i_v_a_r.
-
- The sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt routines return when _i_v_a_r is no longer equal to
- _c_m_p__v_a_l_u_e.
-
- The sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll routines return when the compare condition is
- true. The compare condition is defined by the _i_v_a_r argument compared
- with the _c_m_p__v_a_l_u_e using the comparison operator, _c_m_p.
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- Example 1: The following call returns when variable _i_v_a_r is not equal
- to 100:
-
- INTEGER*8 IVAR
- CALL SHMEM_INT8_WAIT(IVAR, INT8(100))
-
- Example 2: The following call to SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____WWWWAAAAIIIITTTT____UUUUNNNNTTTTIIIILLLL is equivalent
- to the call to SSSSHHHHMMMMEEEEMMMM____IIIINNNNTTTT8888____WWWWAAAAIIIITTTT in example 1:
-
- INTEGER*8 IVAR
- CALL SHMEM_INT8_WAIT_UNTIL(IVAR, SHMEM_CMP_NE, INT8(100))
-
- Example 3: The following C/C++ call waits until the sign bit in iiiivvvvaaaarrrr
- is set by a transfer from a remote PE:
-
- int ivar;
- shmem_int_wait_until(&ivar, SHMEM_CMP_LT, 0);
-
- Example 4: The following Fortran example is in the context of a
- subroutine:
-
- SUBROUTINE EXAMPLE()
- INTEGER FLAG_VAR
- COMMON/FLAG/FLAG_VAR
- . . .
- FLAG_VAR = FLAG_VALUE ! initialize the event variable
- . . .
- IF (FLAG_VAR .EQ. FLAG_VALUE) THEN
- CALL SHMEM_WAIT(FLAG_VAR, FLAG_VALUE)
- ENDIF
- FLAG_VAR = FLAG_VALUE ! reset the event variable for next time
- . . .
- END
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3), sssshhhhmmmmeeeemmmm____ppppuuuutttt(3)
-
- _M_e_s_s_a_g_e _P_a_s_s_i_n_g _T_o_o_l_k_i_t: _M_P_I _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l
-